import records
from apis.db_setting import ADDRESS


def operation(sentence, multi=False):
    db = records.Database(ADDRESS)
    row = db.query(sentence)
    if multi:
        result = row.first().as_dict()
    else:
        result = row.as_dict()
    return result

if __name__ == '__main__':

    print(operation('select * from war_ucenter'))
